import request from '@/utils/request'

// 查询报修邮箱配置列表
export function listRepairEmail(query) {
  return request({
    url: '/it/repairEmail/list',
    method: 'get',
    params: query
  })
}

// 查询报修邮箱配置详细
export function getRepairEmail(id) {
  return request({
    url: '/it/repairEmail/' + id,
    method: 'get'
  })
}

// 新增报修邮箱配置
export function addRepairEmail(data) {
  return request({
    url: '/it/repairEmail/save',
    method: 'post',
    data: data
  })
}

// 修改报修邮箱配置
export function editRepairEmail(data) {
  return request({
    url: '/it/repairEmail/update',
    method: 'put',
    data: data
  })
}

// 删除报修邮箱配置
export function delRepairEmail(ids) {
  return request({
    url: '/it/repairEmail/remove/' + ids,
    method: 'delete'
  })
}


// 导出报修邮箱配置
export function exportRepairEmail(query) {
  return request({
    url: '/it/repairEmail/export',
    method: 'get',
    params: query
  })
}

// 使用报修邮箱
export function useRepairEmail(id) {
  return request({
    url: '/it/repairEmail/useRepairEmail',
    method: 'put',
    params: {
      id: id
    }
  })
}
